home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / music / 550 / fracsurf / fracsurf.doc next >
Text File  |  1991-08-13  |  4KB  |  105 lines

  1. 06601020202800
  2. 1* Fracsurf *
  3. 6L..T.T....T....T....T....T....T....T....T....T....T....T....T....R
  4. àìFracSurf-TheFractalLandscapeGenerator
  5. Ç
  6. Thisprogramgeneratesrandomfractalsurfacesona128x128
  7. facetgridandallowsyoutoviewthemfromanypointinspace.It
  8. runsinlowresolution(320x200)orhighresolution(640x400)on
  9. anyAtariST.
  10.  
  11. Operationoftheprogramisself-explanatory:Run
  12. 'FRACSURF.PRG'intheusualwayfromtheDesktopandit'll
  13. immediatelygenerateanddisplaylandscape'0'('0'istheseed
  14. fortherandomnumbergenerator).PressingSPACEwillthentoggle
  15. betweentheviewofthelandscapeandthemenu:
  16.  
  17. f1-Newlandscape
  18.  
  19. Thisallowsyoutogenerateanewlandscape.Theprogramasks
  20. youforan'f'valueandaseed.'f'definesthedegreeof
  21. ruggednessofthelandscape,mostrealisticvaluesliebetween
  22. about0.4and1.5.Greatervaluesthan1.5generatesurfacesmore
  23. likemoonscapes.Theseedisameansofidentifyingthe
  24. landscape.Eachvalueproducesatotallyuniquesurface,oneofmy
  25. favouritesislandscape'12345'withan'f'valueof0.8.
  26.  
  27.    Whilegeneratinganewsurface(whichtakesaboutaminute)the
  28. pro-gramillustratesitsprogressbyfillingasquareonscreen,
  29. eachpixelrepresentingafacetwhichhasbeencalculated.
  30.  
  31.    Thetimetakentoshadeandplotthesurfacedependsonthe
  32. detailsetting(definedbyf6).Thedefaultstartupvalueof4
  33. meansthatthesurfaceisplottedasagridof32x32facets.
  34.  
  35. f2-Setviewpoint
  36.  
  37.    Thisallowsyoutodefineyourviewpositioninthe3Duniverse
  38. andyourviewingdirection.Enterfirstyourx,y,zcoordinatesand
  39. thenthex,y,zcoordinatesofthepointonwhichyouwishthe
  40. screentobecentred(usually0,0,0).Thesurfacelieswithinthe
  41. limits-320and320inthexandydirections.
  42.  
  43.    Inadditionyou'llbeaskedforamagnificationfactorforthe
  44. view.Values>1giveatelephotoview,whilstvalues<1givea
  45. wide-angleview.
  46.  
  47. f3-Setlightposition
  48.  
  49.    Asfortheviewpositionthex,y,zcoordinatesofthesingle
  50. lightsourceareentered.Thelightisactuallycalculatedas
  51. beinginfinitelyfarawayinthedirectionofthispoint(ie.the
  52. raysareparallel).
  53.  
  54. f4-Definesealevel(&snowlineinlores)
  55.  
  56.    Thesealevel(&snowline)canbesettoanyheight,default
  57. valuesbeing0and50,respectively.
  58.  
  59. f5-Savescreen(Degas)
  60.  
  61.    Thissavesthecurrentviewasastandard,uncompressedDegas
  62. file.
  63.  
  64. f6-Setdetail
  65.  
  66.    Thedetailfactorforthedisplayofsurfacescanbeinthe
  67. range0to6whichgivethefollowingsurfaceresolutions:
  68.  
  69.                               0-2x2facets
  70. 1-4x4
  71. 2-8x8
  72. 3-16x16
  73. 4-32x32
  74. 5-64x64
  75. 6-128x128
  76.  
  77.    Plottingandshadingtimesgoupbyafactorof4witheach
  78. increaseindetail.
  79.  
  80. f7-Landscapeinformation
  81.  
  82.    Thisgivesinformationonthecurrentlandscapeandview.In
  83. additionitcalculatesthe'fractaldimension'(D)ofthesurface,
  84. whichforallfractalsurfacesliesbetween2and3(seeBenoit
  85. Mandelbrot'sbook'TheFractalGeometryofNature').Highervalues
  86. indicateamoreruggedlandscape,mostearthboundlandscapeslying
  87. between2.3and2.4.Thereisprobablyamathematicalrelationship
  88. between'f'and'D',althoughI'venoideawhatitis!
  89.  
  90. f10-Quit
  91.  
  92.    That'sit.Ihopeyouhavefunexploringtheinfinityof
  93. landscapesthatcanbegenerated.
  94.  
  95.    Foranyonewho'sinterested,FRACSURF.PRGiswritteninGFA
  96. Basic2andFastBasicassembler,andthecompletesourcecodeis
  97. availablefromtheaddressbelowforthemodestfeeof£5.00.Any
  98. comments/complaintsarealsowelcome!
  99.  
  100. JonathanMillar
  101. StCatherine'sCollege
  102. Oxford
  103. OX13UJ
  104.  
  105.